package com.member.shop.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.member.common.annotation.Excel;
import com.member.common.core.domain.BaseEntity;
import com.member.shop.vo.FieldData;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 活动报名对象 sys_biz_activity_enroll
 *
 * @author lixinchen
 * @date 2024-01-09
 */
@Data
@SuperBuilder
@AllArgsConstructor
@NoArgsConstructor
@TableName("sys_biz_activity_enroll")
public class SysBizActivityEnroll extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 活动订单编号
     */
    @Excel(name = "活动订单编号")
    private String activityEnrollCode;

    /**
     * 活动id
     */
    private Long activityId;

    /**
     * 用户id
     */
    private Long userId;

    /**
     * 活动标题(冗余)
     */
    @Excel(name = "活动标题")
    private String title;

    /**
     * 活动开始时间(冗余)
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "活动开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date activityStartTime;

    /**
     * 活动截止时间(冗余)
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "活动截止时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date activityEndTime;

    /**
     * 报名用户类型(0:新用户，1.老用户)
     */
    @TableField(exist = false)
    private String enrollUserTypeName;

    /**
     * 报名姓名
     */
    private String name;

    /**
     * 报名手机号
     */
    private String phone;

    /**
     * 报名状态(0:已报名，1.取消报名)
     */
//    @Excel(name = "报名状态")
    @TableField(exist = false)
    private String enrollStatusName;

    /**
     * 提交用户
     */
    @TableField(exist = false)
    @Excel(name = "提交用户")
    private String fullName;

    /**
     * 提交用户手机号
     */
    @TableField(exist = false)
    @Excel(name = "提交用户手机号")
    private String userPhone;

    /**
     * 会员等级
     */
    @TableField(exist = false)
    @Excel(name = "会员等级")
    private String gradeName;

    /**
     * 支付金额
     */
    @Excel(name = "支付金额")
    private BigDecimal amount;

    /**
     * 支付时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "支付时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date paymentTime;

    /**
     * 身份证号
     */
    private String idCard;

    /**
     * 推荐人
     */
    private String reference;

    /**
     * 组别
     */
    private String divideGroup;

    /**
     * 报名字段信息
     */
    private String info;

    /**
     * 备注
     */
    private String remark;

    /**
     * 报名用户类型(0:新用户，1.老用户)
     */
    private Integer enrollUserType;

    /**
     * 报名状态(0:已报名，1.取消报名)
     */
    private Integer enrollStatus;

    /**
     * 核销状态(0:待核销，1.已核销)
     */
    private Integer verificationStatus;

    /**
     * 核销状态名称(0:待核销，1.已核销)
     */
    @Excel(name = "核销状态")
    @TableField(exist = false)
    private String verificationStatusName;

    /**
     * 退款状态(0:未退款，1.已退款)
     */
    private Integer refundStatus;


    /**
     * 支付截止时间
     */
    private Date paymentEndTime;

    /**
     * 核销二维码
     */
    private String writeOffImage;

    /**
     * 核销码
     */
    @Excel(name = "核销码")
    private String writeOffCode;

    /**
     * 核销人
     */
    private Long writeOffUser;

    /**
     * 核销时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "核销时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date writeOffTime;


    /**
     * 活动封面（冗余）
     */
    private String cover;


    /**
     * 付款状态（0未付款 1已付款 2已取消）
     */
    private Integer payStatus;

    /**
     * 支付流水号
     */
    private String payId;

    /**
     * 富友支付流水号
     */
    private String payNo;

    /**
     * 退款流水号
     */
    private String refundId;

    /**
     * 富友退款流水号
     */
    private String refundNo;

    /**
     * 退款时间
     */
    private Date refundTime;

    /**
     * 富友退款时间
     */
    private String fyRefundTime;


    /**
     * 取消时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date cancelTime;
    private Date cancelReason;
    private String fyId;

    @TableField(exist = false)

    private List<FieldData> fieldList;

    /**
     * 微信流水号
     */
    private String transactionId;

    @Excel(name = "姓名", defaultValue = "/")
    @TableField(exist = false)
    private String xm;
    @TableField(exist = false)
    @Excel(name = "电话", defaultValue = "/")
    private String dh;
    @TableField(exist = false)
    @Excel(name = "身份证号", defaultValue = "/")
    private String sfzh;
    @TableField(exist = false)
    @Excel(name = "新人还是加盟商", defaultValue = "/")
    private String xrhsjms;
    @TableField(exist = false)
    @Excel(name = "推荐人姓名", defaultValue = "/")
    private String tjrxm;
    @TableField(exist = false)
    @Excel(name = "第几组", defaultValue = "/")
    private String djz;
    @TableField(exist = false)
    @Excel(name = "地址", defaultValue = "/")
    private String dz;


}






